﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>分享</title>
    <!-- Bootstrap -->
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet">
    <link href="/CSS/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
    <div class="container-fluid maindiv" style="margin: 20px" id="dvContent">
        <div id="succdiv" style="display:none">
            <div class="alert alert-success" role="alert">分享成功</div>
            <label>复制以下分享外链,发送给相关同事、客户、合作伙伴！</label>
            <div class="input-group">
                <input type="text" id="fxm" class="form-control" />
                <span class="input-group-btn">
                    <button class="btn btn-default btcopy" id="btcopy" type="button">复制链接</button>
                </span>
            </div>
            <p style="margin-top:10px"><a href="#">查看分享页面</a><a href="#" style="margin-left:10px" class="text-danger" id="qxfx">取消分享</a></p>
        </div>
    </div>
    <script src="/Scripts/jquery-1.11.2.min.js"></script>
    <script src="/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/Scripts/SZHLCommon.js"></script>
    <script type="text/javascript" src="/JqueryPlug/ZeroClipboard/jquery.zclip.min.js"></script>
    <script>
        $(document).ready(function () {
            var code = ComFunJS.getQueryString("code");
            ComFunJS.initsetajax();
            if (code != "") {
                $.post('/API/FTAPI.ashx?Action=ADDSHARECODE', { P1: code }, function (resultData) {//P1为个人文件夹
                    var resultData = $.parseJSON(resultData)
                    if (resultData.ErrorMsg == "") {
                        // resultData.Result
                        $("#succdiv").show();
                        $("#fxm").val(resultData.Result + "(提取码：" + resultData.Result1 + ")");
                        $("#btcopy").zclip({
                            path: '/JqueryPlug/ZeroClipboard/ZeroClipboard.swf', //记得把ZeroClipboard.swf引入到项目中
                            copy: $('#fxm').val(),
                            afterCopy: function () {
                                parent.ComFunJS.winsuccess("复制成功");
                            }
                        });
                    }
                })
            }
            $("#qxfx").click(function () {
                $.post('/API/FTAPI.ashx?Action=DELSHARECODE', { P1: code }, function (resultData) {//P1为个人文件夹
                    var resultData = $.parseJSON(resultData)
                    if (resultData.ErrorMsg == "") {
                        parent.ComFunJS.winsuccess("取消分享成功")
                    }
                })
            })


        });
    </script>
</body>
</html>